#ifndef _MULTIBOOT_H_
#define _MULTIBOOT_H_

struct MultibootHeader {
	/* MultiBoot info version number */
	dword flags;

	/* Available memory from BIOS */
	dword mem_lower;
	dword mem_upper;

	/* "root" partition */
	dword boot_device;

	/* Kernel command line */
	dword cmdline;

	/* Boot-Module list */
	dword mods_count;
	dword mods_addr;

	union {
		struct {
			/* (a.out) Kernel symbol table info */
			dword tabsize;
			dword strsize;
			dword addr;
			dword pad;
		} a;
		struct {
			/* (ELF) Kernel section header table */
			dword num;
			dword size;
			dword addr;
			dword shndx;
		} e;
	} syms;

	/* Memory Mapping buffer */
	dword mmap_length;
	dword mmap_addr;

	/* Drive Info buffer */
	dword drives_length;
	dword drives_addr;

	/* ROM configuration table */
	dword config_table;

	/* Boot Loader Name */
	dword boot_loader_name;

	/* APM table */
	dword apm_table;

	/* Video */
	dword vbe_control_info;
	dword vbe_mode_info;
	word vbe_mode;
	word vbe_interface_seg;
	word vbe_interface_off;
	word vbe_interface_len;
};

struct MemoryMap {
	dword size;
	dword base_addr_low;
	dword base_addr_high;
	dword length_low;
	dword length_high;
	dword type;
};

class Multiboot {
public:
	static void Init(void *ptr);
	
private:
	static dword MBLimit;
};

#endif
